import java.sql.DriverManager;
import  java.sql.Connection;

public class Database {
    Connection conn;

    public void connect(){
        try{
            conn = DriverManager.getConnection("jdbc:mysql://localhos:3306/course_system","root","123456");
            System.out.println("数据库连接成功！");
        }catch (Exception e){
            System.out.println("数据库连接失败");
        }
    }
}
